package com.demo.dao.employee;

import com.demo.entity.employee.Employee;
import com.demo.entity.user.User;
import com.demo.entity.user.UserCustom;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;


//@MapperScan
public interface EmployeeDao {
    //------------------------------查找----------------------------------//
    List<Employee> getEmployeesListParams(List<String> employeeIds);

    List<Employee> getEmployeesArrayParams(String[] employeeIds);

    List<Employee> getEmployeesMapParams(Map<String,Object> params);

    //-----------------------------插入,注解方式,不用xml ----------------------------------//
    //jdbcType的类型来自: org.apache.ibatis.type.JdbcType
    @Insert("insert into t_employee (id, firstName, lastName,  email,hireDate,salary,departmentId) \r\n" +
            "        values (#{id,jdbcType=INTEGER},#{firstName,jdbcType=INTEGER},  #{lastName,jdbcType=VARCHAR},\r\n" +
            "        #{email,jdbcType=VARCHAR},#{hireDate,jdbcType=DATE},#{salary,jdbcType=DECIMAL}," +
            " #{departmentId,jdbcType=SMALLINT} )")
    int insertEmployee(Employee employee);


    //-----------------------------更新----------------------------------//



    //------------------------------删除---------------------------------//


}
